import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/home/panel/home'
import User from '@/components/home/panel/user'
import Scenery from '@/components/home/panel/scenery'
import Travel from '@/components/home/panel/travel'
import Login from '@/components/home/panel/user/login'
import UserInfo from '@/components/home/panel/user/userinfo'
Vue.use(VueRouter)
const routes = [
  { path: '/', name: 'default', redirect: '/home' },
  { path: '/home', name: 'home', component: Home },
  {
    path: '/user', name: 'user', component: User, children: [
      { path: 'userinfo', name: 'userinfo', component: UserInfo },
      { path: 'login', name: 'login', component: Login },
    ]
  },
  { path: '/scenery', name: 'scenery', component: Scenery },
  { path: '/travel', name: 'travel', component: Travel },
]
const router = new VueRouter({
  routes
})
export default router
